//
//  YWQrcodeData.m
//  maintain
//
//  Created by Kyo on 16/3/1.
//  Copyright © 2016年 ewin. All rights reserved.
//

#import "YWQrcodeData.h"
#import "MJExtension.h"

#import "YWBuildingJson.h"

@implementation YWQrcodeData
+ (NSDictionary *)mj_objectClassInArray
{
    return @{@"equipments":@"YWEquipment",
             @"pictures":@"YWPicture"};
}

- (void)mj_keyValuesDidFinishConvertingToObject
{
    if (self.apartment) {
        self.building.apartments = @[self.apartment];
    }
    if (self.floor) {
        self.apartment.floors = @[self.floor];
    }
    if (self.location) {
        self.floor.locations = @[self.location];
    }
}
@end
